<template>
	<view class="box">
		<navigation></navigation>
		<lunbo></lunbo>
		<plan :tongji1="tongji"></plan>
		<group></group>
		<tabbar flag1="1"></tabbar>
	</view>
</template>

<script>
	import {statistics} from "../../utils/api.js"
	import navigation from "../../components/index/top.vue"
	import lunbo from "../../components/index/lunbo.vue"
	import plan from "../../components/index/plan.vue"
	import group from "../../components/index/group.vue"
	export default {
		components:{
			navigation,
			plan,
			group,
			lunbo,
		},
		data() {
			return {
				tongji:{}
			}
		},
		onShow(){
			this.yhtj()
		},
		methods: {
			//用户统计
			async yhtj(){
				let id = this.$store.state.user.id
				const {data:res} = await statistics(id)
				this.tongji = res.data
				// console.log(this.tongji)
			}
		}
	}
</script>

<style scoped>
	.box{
		margin-bottom: 50px;
	}
</style>
